/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controllers;

import java.util.ArrayList;

/**
 *
 * @author Đức Trung
 */
public class UserController {
    public static ArrayList<entity.User> getAll(){
        return new dao.User().getAllUser();
    }
    public static boolean insert(entity.User user){
        return new dao.User().addUser(user.getUsername(),user.getPassword(), user.getId());
    }
    public static boolean update(int id, entity.User user){
        return new dao.User().updateUser(id, user.getUsername(),user.getPassword(),user.getId());
    }
    public static boolean remove(int id){
        return new dao.User().deleteUser(id);
    }
}
